#ifndef	__SYSTEM_H__
#define	__SYSTEM_H__

#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include "Input.h"
#include "Graphics.h"

#include "fpsclass.h"
#include "cpuclass.h"
#include "timerclass.h"

class System
{
public:
	System();
	System(const System&);
	~System();

	bool Initialize();
	void Shutdown();
	void Run();

	LRESULT CALLBACK MessageHandler(HWND hwnd, UINT umsg, WPARAM wparam, LPARAM lparam);

private:
	bool Frame(float fTime);
	void InitializeWindows(int& screenWidth, int& screenHeight);
	void ShutdownWindows();
	void SetParam();
private:
	LPCWSTR m_applicationName;
	HINSTANCE m_hinstance;
	HWND m_hwnd;


	Input* m_pInput;
	Graphics* m_pGraphics;

	FpsClass* m_Fps;
	CpuClass* m_Cpu;
	TimerClass* m_Timer;

	bool m_bFULL_SCREEN;
	bool m_bVSYNC_ENABLED;
	float SCREEN_DEPTH;
	float SCREEN_NEAR;
};

static LRESULT CALLBACK WndProc(HWND hwnd, UINT umessage, WPARAM wparam, LPARAM lparam);
static BOOL CALLBACK ColorScrDlg(HWND, UINT, WPARAM, LPARAM);
static System* g_pApplicationHandle = 0;

#endif

